﻿@{
    ViewBag.Title = "业绩管理";
    Layout = "~/Views/Shared/_Layout.cshtml";
    var tag = ViewData["MoneyType"] == null ? 0 : Convert.ToInt32(ViewData["MoneyType"]);
}
@using JStore.Core.Enums
@using SpeadFrm.Extensions
@using SpeadFrm.MvcPager
@model PagedList<JStore.Web.Controllers.MoneyLogs.ViewModels.MoneyLogModel>
<div class="right_box_card">
    <ul>
        <li class="@(tag == 0 ? "right_box_card1" : "right_box_card2")"><a href="@Url.Action("UserList", "MoneyLogs")">
            所有业绩</a></li>
        <li class="@(tag == 1 ? "right_box_card1" : "right_box_card2")"><a href="@Url.Action("UserList", "MoneyLogs", new { MoneyType = (int)MoneyType.TjMoney })">
            零售奖</a></li>
        <li class="@(tag == 2 ? "right_box_card1" : "right_box_card2")"><a href="@Url.Action("UserList", "MoneyLogs", new { MoneyType = (int)MoneyType.JdMoney })">
            批发奖</a></li>
        <li class="@(tag == 3 ? "right_box_card1" : "right_box_card2")"><a href="@Url.Action("UserList", "MoneyLogs", new { MoneyType = (int)MoneyType.ManageMoney })">
            市场管理奖</a></li>
        <li class="@(tag == 4 ? "right_box_card1" : "right_box_card2")"><a href="@Url.Action("UserList", "MoneyLogs", new { MoneyType = (int)MoneyType.FosterMoney })">
            培育奖</a></li>
    </ul>
</div>
<table class="right_box_tab" style="margin-top: 10px;" width="100%" border="0" cellspacing="0"
    cellpadding="0">
    <tr height="30" class="tab_title">
        <td>
            业绩类型
        </td>
        <td>
            结算金额
        </td>
        <td>
            结算比率
        </td>
        <td>
            业绩金额
        </td>
        <td>
            复消比率
        </td>
        <td>
            实际发放金额
        </td>
        <td>
            结算时间
        </td>
        <td>
            是否已发放
        </td>
        <td>
            发放时间
        </td>
    </tr>
    @foreach (var item in Model)
    {
        <tr height="35" class="tab_td1" style="line-height: 26px;" onmouseover="this.className = 'tab_td2' "
            onmouseout=" this.className = 'tab_td1'">
            <td class="red">
                @(item.MoneyType.ToDescriptionName())
            </td>
            <td>
                @item.BalanceMoney
            </td>
            <td>
                @item.Rate.ToString("p")
            </td>
            <td>
                @item.TotalMoney
            </td>
            <td>
                @item.OtherRate.ToString("p")
            </td>
            <td class="red">
                @item.RealMoney
            </td>
            <td>
                @item.CreateDate
            </td>
            <td>
                @(item.IsSend ? "已发放" : "待发放")
            </td>
            <td>
                @(item.ModifyTime == null ? "-" : item.ModifyTime.ToString())
            </td>
        </tr>
    }
</table>
<div style="padding: 10px;">
    @Html.Pager(Model)
</div>
